package com.company.shop;

import com.company.creature.Creature;

/**
 * @description:
 * @author: ZhaoYicong
 * @date: Created in 2020/4/27 17:20
 * @version: v1.0
 * @modified By:
 */
public class RandomAttack extends Attribute {
    @Override
    public String getSay() {
        return "重置自身攻击了   范围：30~370";
    }

    @Override
    public void function(Creature creature) {
        creature.setIniHurt(-(int) (Math.random()*370+30));
        creature.setMoney(creature.getMoney()-this.getSmoney());
    }

    public RandomAttack(int smoney, String id, String name) {
        super(smoney, id, name);
    }
}
